@foreach($results as $result)
<tr>
    @if(\App\Models\Settings::get('use_avatars'))
    <td>
        @if($result->avatar)
        <a href="{{ URL::asset(Config::get('icr.config.uploads_path')) }}/avatar/large/{{ $result->avatar }}"
           data-lightbox="{{ $result->id }}">
            <img src="{{ URL::asset(Config::get('icr.config.uploads_path')) }}/avatar/small/{{ $result->avatar }}"
                 width="24" height="24"/>
        </a>
        @else
        <i class="glyphicon glyphicon-user"></i>
        @endif
    </td>
    @endif
    <td>@if(!is_null($result->deleted_at))
        <span class="label label-important">Deleted</span>
        @endif
        {{ $result->username }}
    </td>
    <td>{{ $result->email }}</td>
    <td>{{ $result->getRoles() }}</td>
    <td>{{ $result->deleted_at ? date('d.m.Y - H:i:s', strtotime($result->deleted_at)) : '-' }}</td>
    <td>{{ date('d.m.Y - H:i:s', strtotime($result->created_at)) }}</td>
    <td>{{ $result->confirmed_at ? date('d.m.Y - H:i:s', strtotime($result->confirmed_at)) : '-' }}</td>
    <td>{{ $result->lastSeen() ? date('d.m.Y - H:i:s', strtotime($result->lastSeen())) : '-' }}</td>
    <td>
        <!-- Delete button -->
        {!! Form::operationButton('#', ' data-href="' . URL::to($uri . '/delete/' . $result->id) . '" data-toggle="modal" data-target="#delete" title="'.trans('temp.delete').'" class="btn btn-small btn-danger delete-btn"', 'halflings-icon white trash', '', $uri . '/delete') !!}

        <!-- Edit -->
        {!! Form::operationButton($uri . '/edit/' . $result->id, 'title="'.trans('temp.edit').'" class="btn btn-small btn-warning"', 'halflings-icon white pencil', '', $uri . '/edit') !!}

        <!-- Disable -->
        {!! Form::operationButton($uri . '/disable/' . $result->id, 'title="'.trans('temp.disable').'" class="btn btn-small btn-danger '. (($result->deleted_at) ? 'disabled' : '') . '"', 'halflings-icon white arrow-down', '', $uri . '/disable') !!}

        <!-- Restore -->
        {!! Form::operationButton($uri . '/activate/' . $result->id, 'title="'.trans('temp.disable').'" class="btn btn-small btn-success '. ((!$result->deleted_at) ? 'disabled' : '') . '"', 'halflings-icon white arrow-up', '', $uri . '/activate') !!}

    </td>
</tr>
@endforeach